var e = require;
var t = module;
var o = exports;
Object.defineProperty(o, "__esModule", {value: !0});
var n = cc._decorator,
    a = n.ccclass,
    i =
        (n.property,
        (function (e) {
            function t() {
                return (null !== e && e.apply(this, arguments)) || this;
            }
            var o;
            return (
                __extends(t, e),
                (o = t),
                (t.showNewToast = function (e, t) {
                    void 0 === t && (t = cc.Color.BLACK);
                    var n = o.createSpriteNode("toast", null, cc.find("Canvas"));
                    (n.width = 400), (n.height = 100);
                    var a = o.createNode("txt", n);
                    (a.width = 400),
                        (a.height = 100),
                        a.addComponent(cc.Label),
                        (a.getComponent(cc.Label).overflow = cc.Label.Overflow.NONE),
                        (a.getComponent(cc.Label).fontSize = 32),
                        (a.getComponent(cc.Label).string = e),
                        (a.getComponent(cc.Label).enableBold = !0),
                        a.addComponent(cc.LabelOutline),
                        (a.getComponent(cc.LabelOutline).color = cc.Color.WHITE),
                        (a.getComponent(cc.LabelOutline).width = 2),
                        (a.color = t),
                        n.setPosition(cc.v2(0, -150)),
                        n.setSiblingIndex(cc.find("Canvas").childrenCount),
                        cc
                            .tween(n)
                            .by(1, {position: cc.v3(0, 150, 0)})
                            .call(function () {
                                n.destroy();
                            })
                            .start();
                }),
                (t.createSpriteNode = function (e, t, o) {
                    var n = new cc.Node(e);
                    return (
                        (n.addComponent(cc.Sprite).spriteFrame = t),
                        null != o ? o.addChild(n) : cc.director.getScene().addChild(n),
                        n
                    );
                }),
                (t.createNode = function (e, t, o) {
                    void 0 === o && (o = new cc.Vec2(0, 0));
                    var n = new cc.Node(e);
                    return null != t ? t.addChild(n) : cc.director.getScene().addChild(n), n;
                }),
                (o = __decorate([a], t))
            );
        })(cc.Component));
o.default = i;
